﻿Imports System.Globalization

Module Module1
  Sub Main()

    Dim numero As Double = 1517318.25

    Dim cultura As CultureInfo =
      My.Application.Culture
    Console.WriteLine(
      "Impostazioni attuali: {0}", cultura.Name)

    Dim CulturaUI As CultureInfo =
      My.Application.UICulture
    Console.WriteLine(
      "Impostazioni UI attuali: {0}", CulturaUI.Name)
    Console.WriteLine()
    Console.WriteLine(
      FormatNumber(numero, 2, TriState.UseDefault,
                   TriState.UseDefault, TriState.True))
    Console.WriteLine()

    My.Application.ChangeCulture("en-US")
    My.Application.ChangeUICulture("en-US")

    Console.WriteLine("Nuove impostazioni: {0}, {1}",
                      My.Application.Culture.Name,
                      My.Application.UICulture.Name)
    Console.WriteLine()
    Console.WriteLine(
      FormatNumber(numero, 2,
                   TriState.UseDefault,
                   TriState.UseDefault,
                   TriState.True))
    Console.ReadLine()

  End Sub
End Module
